package com.hiwhitley.easy.day13;

/**
 * Created by hiwhitley on 2016/8/17.
 */
public class IsPowerOfFour {
    public boolean isPowerOfFour(int num) {
        if (num == 1) return true;
        else if (num == 0) return false;
        else if (num % 4 == 0)
            return isPowerOfFour(num / 4);
        else return false;
    }
}
